package groovy.com.wz.test;

import java.util.Objects;

public class Account {
    private String accNo;
    private String userId;

    public Account(String accNo, String userId) {
        this.accNo = accNo;
        this.userId = userId;
    }

    public String getAccNo() {
        return accNo;
    }

    public String getUserId() {
        return userId;
    }

    public void setAccNo(String accNo) {
        this.accNo = accNo;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Account account = (Account) o;
        return Objects.equals(accNo, account.accNo) && Objects.equals(userId, account.userId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(accNo, userId);
    }

    @Override
    public String toString() {
        return "Account{" +
                "accNo='" + accNo + '\'' +
                ", userId='" + userId + '\'' +
                '}';
    }
}